<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>let</title>
</head>
<body>
    <script>
        // 声明变量
        // let a;
        // let b, c, d;
        // let e = 100;
        // let f = 521, g = 'iloveyou', h = [];

        // 1.变量不能重复声明   ==> Uncaught SyntaxError: Identifier 'star' has already been declared
        // let star = '罗志祥';
        // let star = '小猪';

        // 2.块级作用域  ES5: 全局 函数  eval    ==> Uncaught ReferenceError: girl is not defined
        // if else while for
        // {
        //     let girl = '周扬青';
        // }
        // console.log(girl)

        // 3.不存在变量提升  ==> Uncaught ReferenceError: Cannot access 'song' before initialization
        // console.log(song);
        // let song = '恋爱达人';

        // 4.不影响作用域链
        // {
        //     let school = '尚硅谷';
        //     function fn(){
        //         console.log(school);
        //     }
        //     fn();
        // }
    </script>
</body>
</html>